﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>职称设置</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@3.3.4/dist/vue.global.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <script src="https://unpkg.com/element-plus/dist/index.full.min.js"></script>
    <style>
        .txt_bg {
            background-color: #FFD553;
        }

        #app table tr td {
            border: 1px solid #000000;
            margin: 3px;
        }

        body {
            background-color: #FFFFCC;
        }
        td {
            padding: 3px;
        }

        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

            .avatar-uploader .el-upload:hover {
                border-color: #409EFF;
            }

        .avatar-uploader-icon {
            font-size: 28px;    
            color: #8c939d;
            width: 228px;
            height: 228px;
            line-height: 228px;
            text-align: center;
        }

        .avatar {
            width: 228px;
            height: 228px;
            display: block;
        }

    </style>
</head>
<body>
    <div id="app">
        <div>您正在做的业务是：人力资源--招聘管理--简历管理--简历登记</div>
        <div>
            <button v-on:click="Add">提交</button>
                <table>
                    <tr>
                        <td width="90px" class="txt_bg">职位分类</td>
                        <td width="150px"><el-input v-model="formData.HumanMajorKindName" readonly></el-input></td>
                    <td width="90px" class="txt_bg">职位名称</td>
                        <td width="150px"><el-input v-model="formData.HunmaMajorName" readonly></el-input></td>
                    <td width="90px" class="txt_bg">招聘类型</td>
                        <td width="140px"><el-input v-model="formData.EngageType" readonly></el-input></td>
                        <td colspan="2" rowspan="6">
                            <!-- 头像 -->
                            <el-upload class="avatar-uploader"
                                       ref="upload"
                                       action="/ER_Add/WJS"
                                       :show-file-list="false"
                                       :on-success="handleAvatarSuccess"
                                       :before-upload="beforeAvatarUpload">
                                <img v-if="imageUrl" :src="imageUrl" class="avatar">
                                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                            </el-upload>
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">姓名</td>
                        <td><el-input v-model="formData.HumanName" readonly placeholder="请输入姓名"></el-input></td>
                    <td class="txt_bg">性别</td>
                        <td><el-input v-model="formData.HumanSex" readonly></td>
                    <td class="txt_bg">EMAIL</td>
                        <td><el-input v-model="formData.HumanEmail" readonly placeholder="请输入邮箱"></el-input></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">电话</td>
                        <td><el-input v-model="formData.HumanTelephone" readonly placeholder="请输入电话"></el-input></td>
                    <td width="90px" class="txt_bg">家庭电话</td>
                        <td><el-input v-model="formData.HumanHomephone" readonly placeholder="请输入家庭电话"></el-input></td>
                    <td class="txt_bg">手机</td>
                        <td><el-input v-model="formData.HumanMobilephone" readonly placeholder="请输入手机"></el-input></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">住址</td>
                        <td colspan="3"><el-input v-model="formData.HumanAddress" readonly placeholder="请输入住址"></el-input></td>
                    <td class="txt_bg">邮编</td>
                        <td><el-input v-model="formData.HumanPostcode" readonly placeholder="请输入邮编"></el-input></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">国籍</td>
                        <td><el-input v-model="formData.HumanNationality" readonly placeholder="请输入出生地"></el-input></td>
                    <td class="txt_bg">出生地</td>
                        <td><el-input v-model="formData.HumanBirthplace" readonly placeholder="请输入出生地"></el-input></td>
                    <td class="txt_bg">生日</td>
                        <td><el-date-picker v-model="formData.HumanBirthday" readonly type="date" placeholder="请选择日期"></el-date-picker></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">民族</td>
                        <td><el-input v-model="formData.HumanRace" readonly></td>
                    <td class="txt_bg">宗教信仰</td>
                        <td><el-input v-model="formData.HumanReligion" readonly></td>
                    <td class="txt_bg">政治面貌</td>
                        <td><el-input v-model="formData.HumanParty" readonly></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">身份证号码</td>
                        <td><el-input v-model="formData.HumanIdcard" readonly placeholder="请输入身份证号码"></el-input></td>
                    <td class="txt_bg">年龄</td>
                        <td><el-input v-model="formData.HumanAge" readonly placeholder="请输入年龄"></el-input></td>
                    <td class="txt_bg">毕业院校</td>
                        <td><el-input v-model="formData.HumanCollege" readonly placeholder="请输入毕业院校"></el-input></td>
                    <td class="txt_bg">学历</td>
                        <td><el-input v-model="formData.HumanEducatedDegree" readonly></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">教育年限</td>
                        <td><el-input v-model="formData.HumanEducatedYears" readonly></td>
                    <td class="txt_bg">学历专业</td>
                        <td><el-input v-model="formData.HumanEducatedMajor" readonly></td>
                    <td class="txt_bg">薪酬要求</td>
                        <td><el-input v-model="formData.DemandSalaryStandard" readonly placeholder="请输入薪酬要求"></el-input></td>
                    <td class="txt_bg">注册时间</td>
                        <td>
                            <el-input type="text" v-model="formData.RegisterTime" readonly name="RegistTime" />
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">特长</td>
                        <td><el-input v-model="formData.HumanSpeciality" readonly></td>
                    <td class="txt_bg">爱好</td>
                        <td><el-input v-model="formData.HumanHobby" readonly></td>
                    <td class="txt_bg">推荐人</td>
                        <td><el-input v-model="formData.Referrers" readonly></td>
                    <td class="txt_bg">推荐时间</td>
                        <td><el-input v-model="formData.Recommended_time" readonly></td>
                    </tr>
                    <tr>
                    <td class="txt_bg">个人履历</td>
                        <td colspan="7">
                            <el-input v-model="formData.HumanHistoryRecords" readonly type="textarea" :rows="3" placeholder="请输入个人履历"></el-input>
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">备注</td>
                        <td colspan="7">
                            <el-input v-model="formData.Remark" readonly type="textarea" :rows="3" placeholder="请输入备注"></el-input>
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">推荐意见</td>
                        <td colspan="7">
                        <el-input v-model="formData.Recomandation" readonly type="textarea" :rows="3" placeholder="请输入推荐意见"></el-input>
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">面试次数</td>
                        <td>
                            @* <el-input type="text" placeholder="请输入面试次数"></el-input> *@
                            <input type="text" v-model="num" placeholder="请输入面试次数">
                        </td>
                    <td class="txt_bg">形象评价</td>
                        <td>
                            <el-select v-model="value1"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options1"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    <td class="txt_bg">口才评价</td>
                        <td>
                            <el-select v-model="value2"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options2"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    <td class="txt_bg">外语口语能力</td>
                        <td>
                            <el-select v-model="value3"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options3"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">应变能力</td>
                        <td>
                            <el-select v-model="value4"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options4"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    <td class="txt_bg">EQ</td>
                        <td>
                            <el-select v-model="value5"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options5"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    <td class="txt_bg">IQ</td>
                        <td>
                            <el-select v-model="value6"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options6"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    <td class="txt_bg">综合素质</td>
                        <td>
                            <el-select v-model="value7"
                                       placeholder="请选择"
                                       size="large"
                                       style="width: 150px">
                                <el-option v-for="item in options7"
                                           :key="item.value"
                                           :label="item.label"
                                           :value="item.value" />
                            </el-select>
                        </td>
                    </tr>
                    <tr>
                    <td class="txt_bg">面试人</td>
                        <td><input type="text" value="@Context.Session.GetString("PName")" name="Register" readonly></td>
                    <td class="txt_bg">面试时间</td>
                        <td><input type="date" v-model="registTime" name="RegistTime" /></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                <tr>
                    <td class="txt_bg">面试评价</td>
                    <td colspan="7">
                        <el-input v-model="mspj" type="textarea" :rows="3" placeholder="请输入面试评价"></el-input>
                    </td>
                </tr>
                </table>
        </div>
    </div>
    <script>
        const { createApp, ref, reactive, onMounted } = Vue;
        const app = createApp({
            setup() {
                // 表单数据
                const formData = reactive({
                    HumanName: '',//姓名
                    HumanEmail: '',//email
                    HumanTelephone: '',//电话号码
                    HumanHomephone: '',//家庭电话
                    HumanMobilephone: '',//手机
                    HumanAddress: '',//地址
                    HumanPostcode: '',//邮编
                    HumanBirthplace: '',//出生地
                    HumanBirthday: '',//生日
                    HumanIdcard: '',//请输入身份证号码
                    HumanAge: '',//年龄
                    HumanCollege: '',//薪酬要求
                    DemandSalaryStandard: '',//毕业院校
                    RegisterTime: '',//注册时间
                    HumanHistoryRecords: '',//个人履历
                    Remark: '',//备注
                    HumanMajorKindId: '',//职位分类编号
                    HumanMajorKindName: '',//职位分类名称
                    HumanMajorId: '',//职位编号
                    HunmaMajorName: '',//职位名称
                    EngageType:'',//招聘类型
                    HumanSex:'',//性别
                    HumanNationality:'',//国籍
                    HumanRace:'',//名族
                    HumanReligion:'',//宗教信仰
                    HumanParty:'',//政治面貌
                    HumanEducatedYears:'',//教育年限
                    HumanEducatedDegree:'',//学历
                    HumanEducatedMajor:'',//学历专业
                    HumanSpeciality:'',//特长
                    HumanHobby:'',//爱好
                    Register:'',//推荐人
                    Referrers:'',//推荐人
                    Recommended_time:'',//推荐时间
                    Recomandation:''//推荐意见
                });
                const id = ref(0);
                const imageUrl = ref('');

                function fill(){
                    axios.get('/ERAndEI_AUS/SelectById_ER',{
                        params:{
                            id:id.value
                        }
                    })
                    .then(res=>{
                        console.log(res.data.zhi)
                        formData.HumanName = res.data.zhi.human_name
                        formData.HumanEmail = res.data.zhi.human_email
                        formData.HumanTelephone = res.data.zhi.human_telephone
                        formData.HumanHomephone = res.data.zhi.human_homephone
                        formData.HumanMobilephone = res.data.zhi.human_mobilephone
                        formData.HumanAddress = res.data.zhi.human_address
                        formData.HumanPostcode = res.data.zhi.human_postcode
                        formData.HumanBirthplace = res.data.zhi.human_birthplace
                        formData.HumanBirthday = res.data.zhi.human_birthday
                        formData.HumanIdcard = res.data.zhi.human_idcard
                        formData.HumanAge = res.data.zhi.human_age
                        formData.HumanCollege = res.data.zhi.human_college
                        formData.DemandSalaryStandard = res.data.zhi.demand_salary_standard
                        formData.RegisterTime = res.data.zhi.regist_time
                        formData.HumanHistoryRecords = res.data.zhi.human_history_records
                        formData.Remark = res.data.zhi.remark
                        formData.HumanMajorKindName = res.data.zhi.human_major_kind_name
                        formData.HunmaMajorName = res.data.zhi.human_major_name
                        formData.EngageType = res.data.zhi.engage_type
                        formData.HumanSex = res.data.zhi.human_sex
                        formData.HumanNationality = res.data.zhi.human_nationality
                        formData.HumanRace = res.data.zhi.human_race
                        formData.HumanReligion = res.data.zhi.human_religion
                        formData.HumanParty = res.data.zhi.human_party
                        formData.HumanEducatedYears = res.data.zhi.human_educated_years
                        formData.HumanEducatedDegree = res.data.zhi.human_educated_degree
                        formData.HumanEducatedMajor = res.data.zhi.human_educated_major
                        formData.HumanSpeciality = res.data.zhi.human_specility
                        formData.HumanHobby = res.data.zhi.human_hobby
                        formData.Register = res.data.zhi.register
                        imageUrl.value = res.data.zhi.human_picture
                        formData.Referrers = res.data.zhi.referrers
                        formData.Recommended_time = res.data.zhi.recommended_time
                        formData.Recomandation = res.data.zhi.recomandation

                    })
                }

                // 初始化
                onMounted(() => {
                    const urlParams = new URLSearchParams(window.location.search);
                    id.value = urlParams.get('id');
                    console.log(id.value)
                    console.log(msr.value)
                    fill();
                });

                const value1 = ref();//形象评价
                const options1 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];
                const value2 = ref();//口才评价
                const options2 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];
                const value3 = ref();//外语口语能力
                const options3 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];
                const value4 = ref();//应变能力
                const options4 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];
                const value5 = ref();//EQ
                const options5 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];
                const value6 = ref();//IQ
                const options6 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];
                const value7 = ref();//综合素质
                const options7 = [
                    {
                        value: "A",
                        label: "A"
                    },
                    {
                        value: "B",
                        label: "B"
                    },
                    {
                        value: "C",
                        label: "C"
                    }
                ];

                const num = ref('');//面试次数
                const msr = ref("@Context.Session.GetString("PName")")//面试人
                const registTime = ref('')//面试时间
                const mspj = ref('')

                function Add(){
                    axios.get('/ERAndEI_AUS/Add',{
                        params:{
                            HumanName:formData.HumanName,
                            InterviewAmount:num.value,
                            HumanMajorKindId:formData.human_major_kind_id,
                            HumanMajorKindName:formData.HumanMajorKindName,
                            HumanMajorId:formData.human_major_id,
                            HunmaMajorName:formData.HunmaMajorName,
                            ImageDegree:value1.value,
                            NativeLanguageDegree:value2.value,
                            ForeignLanguageDegree:value3.value, 
                            ResponseSpeedDegree:value4.value, 
                            EQDegree:value5.value, 
                            IQDegree:value6.value,
                            MultiQualityDegree:value7.value, 
                            Register:msr.value, 
                            RegisteTime:registTime.value,
                            ResumeId:id.value,
                            InterviewComment:mspj.value
                        }
                    })
                    .then(res=>{
                        if(res.data.zhi=="ok"){
                            ElementPlus.ElMessage.success('添加成功');
                        }
                    })
                    .catch(err=>{
                        console.log(err)
                    })
                }


                return {
                    formData,
                    imageUrl,
                    value1,
                    value2,
                    value3,
                    value4,
                    value5,
                    value6,
                    value7,
                    options1,
                    options2,
                    options3,
                    options4,
                    options5,
                    options6,
                    options7,
                    num,
                    registTime,
                    Add,
                    mspj
                };
            }
        });

        app.use(ElementPlus);
        app.mount('#app');
    </script>
</body>
</html>